<?php
$this->breadcrumbs=array(
	AdminModule::t("Users"),
);
?>

<?php /*if(AdminModule::isAdmin()) {
	?><ul class="operations">
	<li><?php echo CHtml::link(AdminModule::t('Manage User'),array('cpanel/manage')); ?></li>
	<li><?php echo CHtml::link(AdminModule::t('Manage Profile Field'),array('profileField/admin')); ?></li>
	<li><?php echo CHtml::link(AdminModule::t('Create New Admin'),array('cpanel/create')); ?></li>
</ul><!-- actions --><?php 
} */  ?>
<div class="admin_table">
<h1><?php echo AdminModule::t("List User"); ?></h1>
<div class="link">
<?php echo "".CHtml::link('Add New User',ApplicationConfig::getURL("admin", "Cpanel", "create"),array()); ?>
</div>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'dataProvider'=>$dataProvider,
	'columns'=>array(
		array(
			'name' => 'id',
			'type'=>'raw',
			'value' => '$data->id',
		),
		array(
			'name' => 'username',
			'type'=>'raw',
			'value' => 'CHtml::link(CHtml::encode($data->username),array("cpanel/view","id"=>$data->id))',
		),
		/*array(
			'name' => 'createtime',
			'value' => 'date("d.m.Y H:i:s",$data->createtime)',
		),
		array(
			'name' => 'lastvisit',
			'value' => '(($data->lastvisit)?date("d.m.Y H:i:s",$data->lastvisit):AdminModule::t("Not visited"))',
		),*/
		array(
			'name'=>'status',
			'value'=>'Admin::itemAlias("UserStatus",$data->status)',
		),
		array(
			'name'=>'superuser',
			'value'=>'Admin::itemAlias("AdminStatus",$data->superuser)',
		),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
</div>